package com.nervenets.web.enumeration;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.nervenets.i18n.Translator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ApiModel("附件类型：text文本, image图片, audio音频, video视频, pdf, word, excel")
public enum AttachmentType {
    text, image, audio, video, pdf, word, excel;

    @ApiModelProperty("值")
    public String getValue() {
        return this.name();
    }

    @ApiModelProperty("显示文本")
    public String getText() {
        return Translator.translate(this);
    }
}
